package com.cangshi.controller;

import com.cangshi.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;


/**
 * Created by Eoly on 2017/6/5.
 */


@Controller
@RequestMapping("/")
public class PageController {

    @RequestMapping(value = "user/register.html")
    public String registerPage(Model model) {
        User user = new User();
        model.addAttribute("user", user);
        return "user/register";
    }

    @RequestMapping("index.html")
    public String index(Model model) {
        return "redirect:/admin/index.html";
    }
}
